﻿using GN.Pay.TradeChannel.DefaultImpl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.TradeChannel.AliPay.Request
{
    /// <summary>
    /// app支付请求
    /// </summary>
    [Serializable]
    class AppPayRequest : APayRequest
    {
        /// <summary>
        /// 实例化 AppPayRequest
        /// </summary>
        /// <param name="channel"></param>
        /// <param name="order"></param>
        /// <param name="config"></param>
        public AppPayRequest(ITradeChannel channel,
            IOrderPayApply order,
            AliPayConfigure config) : base(channel, order, config)
        {
            
        }       

        /// <summary>
        /// 获取服务
        /// </summary>
        public override string Service
        {
            get
            {
                return "mobile.securitypay.pay";
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="channel"></param>
        /// <param name="config"></param>
        /// <returns></returns>
        public override ITradePayApplyResult Build(ITradeChannel channel, AliPayConfigure config)
        {
            var param = this.BuildSignUrlLinkParam(channel, config, "Sign", "Sign_Type");
            return new TradePayApplyResult("", "", param, TradePayApplyResultCallType.App_Url);
        }
    }
}
